<?php
/**
 * ShopEx licence
 *
 * @copyright  Copyright (c) 2005-2010 ShopEx Technologies Inc. (http://www.shopex.cn)
 * @license  http://ecos.shopex.cn/ ShopEx License
 */

$db['payments']=array (
  'columns' => array (
    'payment_id' => array (
      'type' => 'varchar(20)',
      'required' => true,
      'default' => '',
      'pkey' => true,
      'label' => app::get('b2c')->_('付款单号'),
      'width' => 150,
      'editable' => false,
      'searchtype' => 'has',
      'filtertype' => 'yes',
      'filterdefault' => true,
      'in_list' => true,
      'default_in_list' => true,
      'is_title' => true,
    ),
    'order_id' => 
    array (
      'type' => 'table:orders',
      'label' => app::get('b2c')->_('订单号'),
      'editable' => false,
      'searchtype' => 'has',
      'in_list' => true,
      'default_in_list' => true,
    ),
    't_money' => array (
      'type' => 'money',
      'default' => '0',
      'required' => true,
      'label' => app::get('b2c')->_('订单总金额'),
      'editable' => false,
      'in_list' => true,
      'default_in_list' => true,
    ),
    'payed_money' => array (
      'type' => 'money',
      'default' => '0',
      'required' => true,
      'label' => app::get('b2c')->_('已收金额'),
      'editable' => false,
      'in_list' => true,
      'default_in_list' => true,
    ),
    'cur_money' => array (
      'type' => 'money',
      'label' => app::get('b2c')->_('付款货币金额'),
      'default' => '0',
      'required' => true,
      'editable' => false,
      'width' => 75,
    ),
    'status' => array (
      'type' => array (
        'succ' => app::get('b2c')->_('已支付'),
        'partial' => app::get('b2c')->_('部分支付'),
        'cancel' => app::get('b2c')->_('待支付')
      ),
      'default' => 'cancel',
      'required' => true,
      'label' => app::get('b2c')->_('支付状态'),
      'width' => 75,
      'editable' => false,
      'filtertype' => 'yes',
      'searchtype' => 'has',
      'hidden' => true,
      'filterdefault' => true,
      'in_list' => true,
      'default_in_list' => true,
    ),
    'payee' => array (
      'type' => 'varchar(100)',
      'label' => app::get('b2c')->_('收款人'),
      'width' => 110,
      'editable' => false,
      'filtertype' => 'normal',
      'filterdefault' => true,
      'in_list' => true,
    ),
    'account' => array (
      'type' => 'varchar(50)',
      'label' => app::get('b2c')->_('收款账号'),
      'width' => 110,
      'searchtype' => 'tequal',
      'editable' => false,
      'filtertype' => 'normal',
      'filterdefault' => true,
      'in_list' => true,
    ),
    'bank' => array (
      'type' => 'varchar(50)',
      'label' => app::get('b2c')->_('收款银行'),
      'width' => 110,
      'editable' => false,
      'filtertype' => 'normal',
      'filterdefault' => true,
      'in_list' => true,
    ),
    'money' => array (
      'type' => 'money',
      'label' => app::get('b2c')->_('收款金额'),
      'default' => '0',
      'required' => true,
      'editable' => false,
      'width' => 75,
    ),
    'order_createtime' => array (
      'type' => 'time',
      'label' => app::get('b2c')->_('下单时间'),
      'width' => 110,
      'editable' => false,
      'in_list' => true,
      'default_in_list' => true,
    ), 
    'createtime' =>
    array (
      'type' => 'time',
      'label' => app::get('b2c')->_('付款单创建时间'),
      'width' => 110,
      'editable' => false,
      'filtertype' => 'time',
      'filterdefault' => true,
      'in_list' => true,
      'default_in_list' => true,
      'orderby' => true,
    ),
  ),
  'engine' => 'innodb',
  'version' => '$Rev: 43386 $',
  'comment' => app::get('b2c')->_('付款单表'),
);
